//
//  helpViewController.m
//  ridingOnFoot
//
//  Created by 刘京涛 on 16/3/14.
//  Copyright © 2016年 刘京涛. All rights reserved.
//

#import "helpViewController.h"
#define kscreenWidth  [UIScreen mainScreen].bounds.size.width
#define kscreenHeight  [UIScreen mainScreen].bounds.size.height
//http://cdn.bi-ci.com/webapp/instruction/
@interface helpViewController ()<UIWebViewDelegate>
@property(nonatomic,strong)UIWebView *web;
@end

@implementation helpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIView *navV=[[UIView alloc] initWithFrame:CGRectMake(0, 0,kscreenWidth,64)];
    navV.backgroundColor =[UIColor colorWithRed:50/255.0 green:50/255.0 blue:50/255.0 alpha:1.0];
    [self.view addSubview:navV];
    UIButton *backbtn=[UIButton buttonWithType:(UIButtonTypeSystem)];
    backbtn.frame=CGRectMake(10, 22, 40, 40);
    backbtn.tintColor=[UIColor whiteColor];
    [backbtn setImage:[UIImage imageNamed:@"back"] forState:(UIControlStateNormal)];
    [backbtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)];
    [navV addSubview:backbtn];
    UILabel *navtitle=[[UILabel alloc] initWithFrame:CGRectMake(kscreenWidth/2-80, 22, 160, 40)];
    navtitle.text=@"使用帮助";
    navtitle.textAlignment=NSTextAlignmentCenter;
    navtitle.textColor=[UIColor whiteColor];
    [navV addSubview:navtitle];
    self.web = [[UIWebView alloc]initWithFrame:CGRectMake(0,64, kscreenWidth,kscreenHeight-64)];
    self.web.backgroundColor=[UIColor clearColor];
    NSString *urlStr=@"http://cdn.bi-ci.com/webapp/instruction/";
    NSURL *url=[NSURL URLWithString:urlStr];
    NSURLRequest *request=[[NSURLRequest alloc] initWithURL:url];
    [self.web loadRequest:request];
    self.web.delegate=self;
    [self.view addSubview:self.web];
    self.web.scalesPageToFit = YES;

}
-(void)backAction{
    
    [self.navigationController popToRootViewControllerAnimated:YES];


}


@end
